/**
 * 
 */
package za.co.sindi.oauth.core.context.web.portlet;

import java.io.IOException;
import java.io.OutputStream;
import java.util.Locale;

import javax.portlet.PortletResponse;

import za.co.sindi.oauth.core.context.ResponseContext;

/**
 * @author Buhake Sindi
 * @since 25 March 2012
 *
 */
public class PortletResponseContext implements ResponseContext {

	private static final String METHOD_NOT_SUPPORTED = "Method not supported.";
	private PortletResponse portletResponse;
	
	/**
	 * @param servletContext
	 */
	public PortletResponseContext(PortletResponse portletResponse) {
		super();
		if (portletResponse == null) {
			throw new IllegalArgumentException("Portlet Response may not be null.");
		}
		
		this.portletResponse = portletResponse;
	}

	/**
	 * @return the servletResponse
	 */
	public PortletResponse getPortletResponse() {
		return portletResponse;
	}

	/* (non-Javadoc)
	 * @see com.neurologic.oauth.core.context.ResponseContext#getOutputStream()
	 */
	@Override
	public OutputStream getOutputStream() throws IOException {
		// TODO Auto-generated method stub
		throw new UnsupportedOperationException(METHOD_NOT_SUPPORTED);
	}

	/* (non-Javadoc)
	 * @see com.neurologic.oauth.core.context.ResponseContext#setCharacterEncoding(java.lang.String)
	 */
	@Override
	public void setCharacterEncoding(String encoding) {
		// TODO Auto-generated method stub
		throw new UnsupportedOperationException(METHOD_NOT_SUPPORTED);
	}

	/* (non-Javadoc)
	 * @see com.neurologic.oauth.core.context.ResponseContext#setContentType(java.lang.String)
	 */
	@Override
	public void setContentType(String contentType) {
		// TODO Auto-generated method stub
		throw new UnsupportedOperationException(METHOD_NOT_SUPPORTED);
	}

	/* (non-Javadoc)
	 * @see com.neurologic.oauth.core.context.ResponseContext#setLocale(java.util.Locale)
	 */
	@Override
	public void setLocale(Locale locale) {
		// TODO Auto-generated method stub
		throw new UnsupportedOperationException(METHOD_NOT_SUPPORTED);
	}
}
